load("@build_stack_rules_proto//rules:proto_plugin.bzl", "proto_plugin")

proto_plugin(
    name = "cpp",
    visibility = ["//visibility:public"],
    deps = ["//deps:com_google_protobuf"],
)

proto_plugin(
    name = "java",
    out = "{BIN_DIR}/{PACKAGE}/{PROTO_LIBRARY_BASENAME}.srcjar",
    visibility = ["//visibility:public"],
    deps = ["//deps:com_google_protobuf"],
)

proto_plugin(
    name = "commonjs",
    options = [
        "import_style=commonjs",
    ],
    protoc_plugin_name = "js",
    tool = "@com_google_protobuf_javascript//generator:protoc-gen-js",
    visibility = ["//visibility:public"],
    deps = ["//deps:com_google_protobuf"],
)

proto_plugin(
    name = "closurejs",
    options = [
        "import_style=closure",
        "library={PACKAGE}/{PROTO_LIBRARY_BASENAME}",
    ],
    protoc_plugin_name = "js",
    tool = "@com_google_protobuf_javascript//generator:protoc-gen-js",
    visibility = ["//visibility:public"],
    deps = ["//deps:com_google_protobuf"],
)

proto_plugin(
    name = "python",
    visibility = ["//visibility:public"],
    deps = ["//deps:com_google_protobuf"],
)

proto_plugin(
    name = "pyi",
    visibility = ["//visibility:public"],
    deps = ["//deps:com_google_protobuf"],
)

proto_plugin(
    name = "ruby",
    visibility = ["//visibility:public"],
    deps = ["//deps:com_google_protobuf"],
)

proto_plugin(
    name = "objc",
    visibility = ["//visibility:public"],
    deps = ["//deps:com_google_protobuf"],
)

proto_plugin(
    name = "csharp",
    visibility = ["//visibility:public"],
    deps = ["//deps:com_google_protobuf"],
)

proto_plugin(
    name = "php",
    visibility = ["//visibility:public"],
    deps = ["//deps:com_google_protobuf"],
)

filegroup(
    name = "all_files",
    testonly = True,
    srcs = ["BUILD.bazel"],
    visibility = ["//plugin:__pkg__"],
)
